package Arrays;

import java.util.Arrays;

//                                  数组逆序
public class Test5 {

    public static void revrese(int[] arr){
        int left = 0;
        int right = arr.length - 1;
        while (left < right){
            int tmp = 0;
            tmp = arr[left];
            arr[left] = arr[right];
            arr[right] = tmp;
            left++;
            right--;
        }
    }
    public static void main(String[] args) {
        int[] arr1 = new int[]{6, 3, 7, 2, 5, 9};
        revrese(arr1);
        System.out.println(Arrays.toString(arr1));
    }
}
